<script th:inline="javascript">
var myChart = null;
$(document).ready(function(){
    $('.tab-pane').slimScroll({//设置模块出现滚动条
        height: '150px'
    });

    var jrwza = [[${footPerson.positionA}]];
    var jrwzb = [[${footPerson.positionB}]];
    var wz = $("#wzmc").val();
    var a = jrwza.split(" ");
    for(var i = 0; i < a.length; i++){
        getClass(a[i], 'A');
        $("#ksywz").after("<div class='span6'><span class='label label-large " + "label-inverse arrowed-right'>可适应位置</span><span>" + a[i] + "</span></div>");
    }
    if(jrwzb !== null && jrwzb !== ""){
        var b = jrwzb.split(" ");
        for(var j = 0; j < b.length; j++){
            getClass(b[j], 'B');
            $("#ksywz").after("<div class='span6'><span class='label label-large " + "label-inverse arrowed-right'>可适应位置</span><span>" + b[j] + "</span></div>");
        }
    }
    getClass(wz, 'C');

    require(
        ['echarts', 'echarts/chart/radar'],
        function(ec) {
        myChart = ec.init(document.getElementById('main'));
        myChart.showLoading({
        text: '正在努力的读取数据中...'    //loading话术
        });
        myChart.hideLoading();
        var option = {
        title: {
        text: [[${null == footPerson.yw ? footPerson.name : footPerson.yw}]],
        subtext: '球员数据',
        textStyle: {
        fontSize: 18,
        fontWeight: 'bolder',
        color: '#ccc'
        }
        },
        tooltip: {
        trigger: 'axis'
        },
        toolbox: {
        show: false,
        feature: {
        mark: {show: true},
        dataView: {show: true, readOnly: false},
        restore: {show: true},
        saveAsImage: {show: true}
        }
        },
        calculable: true,
        polar: [{
        indicator: [
        {text: [[${head.nl20}]], max: 100},
        {text: [[${head.nl33}]], max: 100},
        {text: [[${head.nl25}]], max: 100},
        {text: [[${head.nl23}]], max: 100},
        {text: [[${head.nl22}]], max: 100},
        {text: [[${head.nl32}]], max: 100}
        ],
        name: { textStyle: {color: '#ccc'} },
        radius: 85
        }],
        series: [{
        name: '球员数据',
        type: 'radar',
        itemStyle: {
        normal: { areaStyle: {type: 'default'} }
        },
        data: [{
        value: [
        [[${footPerson.skillList[6].number}]],
        [[${footPerson.skillList[19].number}]],
        [[${footPerson.skillList[11].number}]],
        [[${footPerson.skillList[9].number}]],
        [[${footPerson.skillList[8].number}]],
        [[${footPerson.skillList[18].number}]]],
        name: [[${null == footPerson.yw ? footPerson.name : footPerson.yw}]]
        }]
        }]
        };
        myChart.setOption(option);
    });
});
function getClass(wz, issl){
    if (wz === 'GK') $("#GK").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'SW') $("#SW").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'CB') $("#CB").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'LB') $("#LB").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'RB') $("#RB").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'DMF') $("#DMF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'CMF') $("#CMF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'LMF') $("#LMF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'RMF') $("#RMF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'LWF') $("#LWF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'RWF') $("#RWF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'AMF') $("#AMF").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'SS') $("#SS").attr("class", "icon-circle icon-1x position_" + issl);
    if (wz === 'CF') $("#CF").attr("class", "icon-circle icon-1x position_" + issl);
}
</script>